import request from '@/utils/request'


export function getList(page, pageSize, sort) {
  return request({
    url: '/skillscontest/list',
    method: 'get',
    params: {
      page: page,
      pageSize: pageSize,
      sort: sort
    }
  })
}

/*保存理论成绩*/
export function saveTheorys(params) {
  console.log(params)
  return request({
    url: '/skillscontest/',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'PUT',
    data: JSON.stringify(params)
  })

}

/*查询现场1操作成绩*/
export function getOperation1(page, pageSize, sort) {
  return request({
    url: '/skillscontest/operationlist1',
    method: 'get',
    params: {
      page: page,
      pageSize: pageSize,
      sort: sort
    }

  })
}

/*保存現場成绩1*/
export function saveOperation(params) {
  return request({
    url: '/skillscontest/operation',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'PUT',
    data: JSON.stringify(params)
  })
}

/*排序*/
export function sort() {
  return request({
    url: '/ranking/sort',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'get'
  })
}

/*排序集合*/
export function personSortList(page, pageSize) {
  return request({
    url: '/ranking',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'get',
    params: {
      page: page,
      pageSize: pageSize
    }
  })
}

/*查询所有参赛人员*/
export function getExamineeList(page, pageSize, searchSort) {
  return request({
    url: '/examinee',
    method: "get",
    params: {
      page: page,
      pageSize: pageSize,
      sort: searchSort
    }
  })
}

export function updateExaminee(data) {
  return request({
    url: '/examinee',
    headers: {
      'content-type': 'application/json;charsetset=UTF-8'
    },
    method: 'PUT',
    data: JSON.stringify(data)

  })

}

/*团体排名*/
export function groupSort() {
  return request({
    url: '/group/sort',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'get'
  })
}

/*团体排序集合*/
export function groupSortList(page, pageSize) {
  return request({
    url: '/group',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'get',
    params: {
      page: page,
      pageSize: pageSize
    }
  })
}

/*刷新总体成绩*/
export function refresh() {
  return request({
    url: '/skillscontest/refresh',
    headers: {'content-type': 'application/json;charsetset=UTF-8'},
    method: 'get'
  })
}

/*总体成绩查询*/
export function massingList(page, pageSize) {
  return request({
    url: '/skillscontest/massing',
    method: 'get',
    params: {
      page: page,
      pageSize: pageSize
    }

  })
}

/*导出总成绩*/
export function exportToExcel(){
	return request({
		url:'/skillscontest/export',
		method: "get"
	})
}
